import java.util.Scanner;

/**
 * 字符串逆序
 */
public class StringReverse {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            StringBuffer sb = new StringBuffer(scanner.nextLine());
            System.out.println(sb.reverse().toString());
        }
    }
}
